
import ollama

response = ollama.embeddings(model='nomic-embed-text', prompt='The sky is blue because of rayleigh scattering')
# 打印向量
print(response['embedding'])
# 确认向量的长度
print(len(response['embedding']))